﻿using System.Collections.Generic;
using System.Data;
using Unis.Framework.RuleBase.Common;
using KingRoad.EPM.CompletionMaterialsEntity.Model;

namespace KingRoad.EPM.CompletionMaterialsDAL.BcdProjectFileTempService
{    
    /// <summary> 
    /// 文件生成时间 2017/1/12 11:36:11
    /// </summary> 
    public class BcdProjectfiletempService : BaseService<BcdProjectfiletempInfo>, IBcdProjectfiletempService
    {
        /// <summary>
        /// 删除实体
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int DeleteEntity(BcdProjectfiletempInfo info)
        {
            string _modelMapXmlName = "BcdProjectfiletemp";
            int ret = DatabaseExcuteByXmlHelper.NewInstance.ExecuteNonQuery(_modelMapXmlName, "DeleteObject",info.P_ID,info.Fd_ID);
            return ret;
        }
        /// <summary>
        /// 根据proId项目id删除所有有关该项目的信息
        /// </summary>
        /// <param name="proId">项目id</param>
        /// <returns></returns>
        public int DeleteByPID(string proId)
        {
            string _modelMapXmlName = "BcdProjectfiletemp";
            int ret = DatabaseExcuteByXmlHelper.NewInstance.ExecuteNonQuery(_modelMapXmlName, "DeleteByPID", proId);
            return ret;
        }
    }

}
